{% for item in trunk_ports -%}

{% for trunk in item.ports %}
{% if "-" in trunk|string %}
interface range {{ trunk }}
{% else %}
interface {{ trunk }}
{% endif %}
  {% if item.description is defined -%}
  description {{ item.description }}
  {% endif -%}
  switchport trunk encapsulation dot1q
  switchport mode trunk
  switchport trunk native vlan {{ vlan_02['native'].id }}
  switchport trunk allowed vlan {{ allowed_vlans|default('all') }}
  switchport trunk allowed vlan remove 1
  no shutdown
  {% if item.group is defined -%}
  channel-group {{ item.group }} mode on
  {% endif -%}
{% endfor %}

{% endfor %}
